import { createRouter, createWebHistory } from 'vue-router';
//import Home from '../views/Home.vue';
//import About from '../views/About.vue';
import camera from '@/views/device/camera/index';
import radar from '@/views/device/radar/index';
import defencearea from '@/views/device/defencearea/index';
import ptz from '@/views/components/ptz';
import calibration from '@/views/device/calibration/index';
import alarm from '@/views/query/alarm_index';

import historical_map from '@/views/map/historical map';
import realtime_map from '@/views/map/realtime_map';
import config from '@/views/system/config/index';


// 定义路由对象
const routes = [
  {
    path: '/camera',
    name: 'camera',
    component: () => camera
  },
  {
    path: '/radar',
    name: 'radar',
    component: () => radar
  },
  {
    path: '/defencearea',
    name: 'defencearea',
    component: () => defencearea
  },
  {
    path: '/ptz',
    name: 'ptz',
    component: () => ptz
  },
  {
    path: '/calibration',
    name: 'calibration',
    component: () => calibration
  },
  {
    path: '/alarm',
    name: 'alarm',
    component: () => alarm
  },
  {
    path: '/realtime_map',
    name: 'realtime_map',
    component: () => realtime_map
  },
   {
    path: '/historical_map',
    name: 'historical_map',
    component: () => historical_map
  },
  {
    path: '/config',
    name: 'config',
    component: () => config
  },
];

// 创建路由实例
const router = createRouter({
  history: createWebHistory(), // 使用 HTML5 history 模式
  routes: routes
});

export default router;
